import {Checkbox, Form} from 'antd'
import {omit} from 'ramda'

const FormItem = Form.Item;
const CheckboxGroup = Checkbox.Group;



const FormCheckboxGroup= ({disabled, options, getFieldDecorator, initialValue, name, labelCol, label}) => {

    return (
        <FormItem
            labelCol={{span: labelCol || 0}}
            wrapperCol={{span: 24 - (labelCol || 0)}}
            label={label}
        >
            {
                getFieldDecorator(name, {
                    initialValue,
                })(<CheckboxGroup options={options}
                                  disabled={disabled}
                    />
                )
            }
        </FormItem>
    )
}

export default FormCheckboxGroup